package com.brush.brushbasicapi;

import com.brush.brushcommon.redis.service.RedisService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;

import java.util.Arrays;

@SpringBootApplication(scanBasePackages = {"com.brush.brushbasicapi","com.brush.brushcommon"})
@MapperScan(basePackages = {"com.brush.brushcommon.common.*.mapper"})
public class BrushBasicApiApplication {

    public static void main(String[] args) {
        //初始化全部缓存
        System.setProperty("initPartyGroupConfigCache","no");
        ConfigurableApplicationContext run = SpringApplication.run(BrushBasicApiApplication.class, args);
    }


    /**
     * mq 消息转换器
     * @return
     */
    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }


}
